Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community: add method to create branch and list files for gitlab tool #27883

Merged
merged 8 commits into from
Dec 12, 2024

Conversation

lorenzb07
Copy link
Contributor

About

  • Description: In the Gitlab utilities used for the Gitlab tool there are no methods to create branches, list branches and files, as this is already done for Github
  • Issue: None
  • Dependencies: None

This Pull request add the methods:

  • create_branch
  • list_branches_in_repo
  • set_active_branch
  • list_files_in_main_branch
  • list_files_in_bot_branch
  • list_files_from_directory

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Nov 4, 2024
Copy link

vercel bot commented Nov 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Dec 12, 2024 7:07pm

@dosubot dosubot bot added the community Related to langchain-community label Nov 4, 2024
@lorenzb07
Copy link
Contributor Author

@ccurme could you please give me a feedback?

Copy link
Collaborator

@ccurme ccurme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lorenzb07,

This PR has been marked Needs Support. Per our review process, we ask that you demonstrate community support for this feature.

I took a quick look: my reaction is that this could break workflows for existing users. The reason is that if anyone is passing toolkit.get_tools() to an agent, that agent will now need to choose from among 14 tools (instead of the previous 8). This could cause performance to degrade. Wondering if the tools could be gated or "opt-in" somehow.

@lorenzb07
Copy link
Contributor Author

Thank you @ccurme

As you can see here https://github.com/langchain-ai/langchain/blob/master/libs/community/langchain_community/utilities/github.py#L812, I added only some features that are already present on the GitHub tool.

For GitHub there are 20 tools.
Here I tried only to add some basic tools for GitLab using the same logics used for the GitHub tools.

Maybe we can consider and filter which tools are really useful.
Personally I think that the features to read the repo tree and to create new branches are very useful.

@efriis efriis self-assigned this Dec 12, 2024
@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Dec 12, 2024
@efriis efriis enabled auto-merge (squash) December 12, 2024 19:10
@efriis efriis merged commit 4149c0d into langchain-ai:master Dec 12, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Related to langchain-community lgtm PR looks good. Use to confirm that a PR is ready for merging. size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants